package com.example.socialwebserver.controller;

import com.example.socialwebserver.pojo.MatchDAO;
import com.example.socialwebserver.pojo.ServerResult;
import com.example.socialwebserver.service.UserMatch;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.CrossOrigin;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import java.util.List;

@RestController
@CrossOrigin
public class MatchController {
    @Autowired
    UserMatch userMatch;
    @RequestMapping("user/matchFriend")
    public ServerResult UserMatchFriend(Integer id){
        List<MatchDAO> list = userMatch.MatchFriend(id);
        return new ServerResult(0,"匹配列表",list);
    }
    @RequestMapping("user/matchLove")
    public ServerResult UserMatchLove(Integer id){
        List<MatchDAO> list = userMatch.MatchLove(id);
        return new ServerResult(0,"匹配列表",list);
    }
}
